<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>任务列表</title>
		<link rel="stylesheet" type="text/css" href="css/layui/css/layui.css" />
	</head>

	<body>
		<div id="app">


			<p>
				修改表达式
			</p>
			<input v-model="cron" type="text" name="title" required lay-verify="required" placeholder="输入表达式" autocomplete="off" class="">
			<button type="button" class="layui-btn" @click="changCron">修改</button>

		</div>
		<script src="js/api.js" type="text/javascript" charset="utf-8"></script>
		<script src="css/layui/layui.all.js"></script>
		<script src="js/basejs/vue.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/basejs/axios-min.js"></script>

	</body>

	<style>
		body {
			text-align: center;
			width: 31.25rem;
			background-color: #f4f0e6;
			padding:2.0625rem;
			
		}

		a {
			color: #0000FF;
			/* text-align: center; */
		}

		input {
			/* display: block; */
			width: 18.75rem;
			padding-left: 10px;
			height: 38px;
			line-height: 1.3;
			line-height: 38px\9;
			border-width: 1px;
			border-style: solid;
			background-color: #fff;
			border-radius: 2px;
		}
	</style>
	
	<script>
		// var api = "http://songyujianiu.qicp.vip/";
		
		var app = new Vue({
			el: "#app",
			data: function() {
				return {
					triName: "",
					cron: "",
					
				};
			},
			created: function() {
				this.triName = window.localStorage.getItem('triName');
				console.log(this.triName)
				// layer.msg("test", { time: 1000 });		
				
			},
			methods: {
				//
				// 保存
				changCron: function() {
					// alert(triName)
					let that = this;
					const par = new URLSearchParams();
					par.append("triName", app.triName);
					par.append("cron", this.cron);
					axios({
						method: "post",
						url: baseApi + "/quartz/changCron",
						params: par,
					}).then(function(res) {
						console.log(res);
						if (res.data.code == "101") {
							// alert("注册成功");
							layer.msg("修改成功", {
								time: 1000
							});
							
						} else {
							layer.msg(res.data.message, {
								time: 7000
							});
						}
					});
				}
		
			
			}
		});
		
		
	</script>

</html>
